package pap;

/**
 * Singleton that contains system configuration parameters
 */
public class Config {

	private int deltaT;
	private int spaceDimension;
	private static Config instance = null;

	private Config(int deltaT, int spaceDimension) {
		this.deltaT = deltaT;
		this.spaceDimension = spaceDimension;
	}

	public int getSpaceDimension() {
		return spaceDimension;
	}

	/**
	 * Initialization
	 * 
	 * @param deltaT
	 */
	public static void init(int deltaT, int spaceDimension) {
		if (instance == null)
			instance = new Config(deltaT, spaceDimension);
	}

	/**
	 * Returns the single instance of the singleton
	 * 
	 * @return instance
	 */
	public static Config getInstance() {
		return instance;
	}

	public double getDeltaT() {
		return deltaT;
	}
}
